package com.wootide.cms.service.facility.room.table.pojo;

import java.util.HashSet;
import java.util.Set;
import java.util.TreeSet;

import com.wootide.cms.service.facility.room.roominfo.pojo.RoomInfo;

/**
 * 桌次信息POJO
 * 〈一句话功能简述〉
 * 〈功能详细描述〉
 * @author ozm
 * @version 2013-3-8
 * @see TableNoInfo
 * @since 2013-3-8下午4:41:37
 */
public class TableNoInfo implements java.io.Serializable,Comparable<TableNoInfo>
{
    /**
     * 意义，目的和功能，以及被用到的地方<br>
     */
    private static final long serialVersionUID = 1L;

    //桌次ID
    private Integer innerIndex;
    
    //隶属房间
    private RoomInfo roomInfo;
    
    //桌号
    private String tableNo;
    
    //座位数
    private Integer seatNum;
    
    //原价
    private Double originalPricePerTable;
    
    //状态
    private Integer status;
    
    //桌子描述
    private String tableNoInfoDesc;
    
    //折扣价格
    private double discountPrice;
    
    //时段字符传信息
    private String periodStr;
    
    //桌子时段集合
    @SuppressWarnings("rawtypes")
    private Set tablePeriods;


    /* 实现 Comparable 接口中的 compareTo 方法，
     * 通常大于时返回一个正数，小于时返回一个负数，
     * 等于时返回零，具体情况可以自行决定。
     *********************************************************
     * 这里我根据 索引的大小进行了比较。由于 TreeSet
     * 会根据 compareTo 的结果来排序，因此输出结果
     * 应该是按照 索引从小到大排序的。
     * 如果要根据姓名进行排序，只需对这个方法进行相应的修改。*/

    public int compareTo(TableNoInfo arg) 
    {
           return this.tableNo.compareToIgnoreCase(arg.getTableNo());
                    
    }
    
    /**
     * toString
     */
    public String toString()
    {
        return "TableNoInfo [innerIndex=" + innerIndex + ", roomInfo="
                + roomInfo + ", tableNo=" + tableNo + ", seatNum=" + seatNum
                + ", originalPricePerTable=" + originalPricePerTable
                + ", status=" + status + ", tableNoInfoDesc=" + tableNoInfoDesc
                + ", discountPrice=" + discountPrice + "]";
    }

    
    public String getPeriodStr()
    {
        return periodStr;
    }


    public void setPeriodStr(String periodStr)
    {
        this.periodStr = periodStr;
    }


    public String getTableNo()
    {
        return tableNo;
    }

    public void setTableNo(String tableNo)
    {
        this.tableNo = tableNo;
    }

    public Integer getInnerIndex()
    {
        return innerIndex;
    }

    public void setInnerIndex(Integer innerIndex)
    {
        this.innerIndex = innerIndex;
    }

    public RoomInfo getRoomInfo()
    {
        return roomInfo;
    }

    public void setRoomInfo(RoomInfo roomInfo)
    {
        this.roomInfo = roomInfo;
    }

    

    public Integer getSeatNum()
    {
        return seatNum;
    }

    public void setSeatNum(Integer seatNum)
    {
        this.seatNum = seatNum;
    }

    public Integer getStatus()
    {
        return status;
    }

    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public double getDiscountPrice()
    {
        return discountPrice;
    }

    public void setDiscountPrice(double discountPrice)
    {
        this.discountPrice = discountPrice;
    }

    public String getTableNoInfoDesc()
    {
        return tableNoInfoDesc;
    }

    public void setTableNoInfoDesc(String tableNoInfoDesc)
    {
        this.tableNoInfoDesc = tableNoInfoDesc;
    }

    @SuppressWarnings("rawtypes")
    public Set getTablePeriods()
    {
        return tablePeriods;
    }

    @SuppressWarnings("rawtypes")
    public void setTablePeriods(Set tablePeriods)
    {
        this.tablePeriods = tablePeriods;
    }

    public Double getOriginalPricePerTable()
    {
        return originalPricePerTable;
    }

    public void setOriginalPricePerTable(Double originalPricePerTable)
    {
        this.originalPricePerTable = originalPricePerTable;
    }

}